var express = require('express');
const {login} = require('../services/userService');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});


router.post('/login', async function(req, res, next) {
  const result = await login(req);
  res.send(result);
});
module.exports = router;
